<?php
/**
 * Created by PhpStorm.
 * User: lyang
 * Date: 2017/1/1
 * Time: 0:05
 */
function ad_by_id($id){
    $db = YC::make("DB");
    $data = $db->get(
        "yc_ad",
        "*",
        [
            "id[=]"=>$id
        ]
    );
    return $data;
}
function ad_by_position($position){
    $db = YC::make("DB");
    $data = $db->get(
        "yc_ad",
        "*",
        [
            "position[=]"=>$position
        ]
    );
    return $data;
}